<?php 	namespace Common\Model;
use Hdphp\Model\Model;
class Kinds extends Model
{
	protected $table = 'kinds';
	protected $validate = array(
		
	);
	public function store()
	{
		if(!$this->create()) return false;
		$_POST['combine'] = implode(',', $_POST['combine']);
//		p($_POST);die;	
		return $this->add($_POST);
	}
	public function edit($hid,$sid)
	{
		if(!$this->create()) return false;
		$_POST['combine'] = implode(',', $_POST['combine']);
		$this->where('hid',$hid)->update(array('combine'=>$_POST['combine'],'stock'=>$_POST['stock'],'artno'=>$_POST['artno'],'goods_hid'=>$sid));
		return true;
	}
}
